# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-lwp-protocol-socks
_pkgname=LWP-Protocol-socks
pkgver=1.7
pkgrel=11
pkgdesc='Adds support for the socks protocol and proxy facility.'
url='https://metacpan.org/pod/LWP::Protocol::socks'
arch=('any')
license=('GPL')
depends=('perl-libwww' 'perl-io-socket-ssl' 'perl-io-socket-socks'
         'perl-lwp-protocol-https')
source=("http://search.cpan.org/CPAN/authors/id/S/SC/SCR/$_pkgname-$pkgver.tar.gz")
sha512sums=('9135fa87e53c6a190e5de908f4a229f3a5fc0a7e27e89c3cf6e0c5be802bdb3a8fb0e31cfdfe4df51f7fb4b7c5a1a0436e0caaa5c9c55b28176ebb55136462a3')

build() {
  cd  "$_pkgname-$pkgver"

  perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd  "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -type f -name 'perllocal.pod' -delete;
  find "$pkgdir" -type f -name '.packlist' -delete;
}

